//
//  TG_Global.h
//  TongGuanLease
//
//  Created by 张奇 on 2022/4/14.
//

#import <Foundation/Foundation.h>
#import "ZLPhotoActionSheet.h"
#import "TGEnumDefine.h"
#import "TGUrlInfoModel.h"

NS_ASSUME_NONNULL_BEGIN
#define  TGGlobalSharedInstance  [TG_Global sharedInstance]
typedef void (^ComplentBlock)(void);
typedef void (^ComplentValueBlock)(id);
@interface TG_Global : NSObject

+ (instancetype)sharedInstance;

- (ZLPhotoActionSheet *)photoActionSheet:(UIViewController *)sender;

///拍照或从相机选取单张照片
- (void)selectSingleImageWithUploadImageType:(UploadImageType)uploadImageType
                                    selectVC:(UIViewController *)presentVC
                                     canEdit:(BOOL)canEdit
                                     success:(void(^)(UIImage *image, TGUrlInfoModel *urlInfoModel))success;

///身份证识别选取照片
- (void)diyCameraOrLibrarySelectVC:(UIViewController *)presentVC success:(void(^)(NSInteger type, UIImage * image))success;

- (void)cameraOrLibrarySelectVC:(UIViewController *)presentVC maxSelectCount:(NSInteger)count videoNumber:(NSInteger)videocount isAddWaterImage:(BOOL)isAddWaterImage selectAssets:(NSMutableArray<PHAsset *> *)selectAssets success:(void(^)(NSInteger type,UIImage *image, NSURL *videoUrl,NSArray<UIImage *> *  images, NSArray<PHAsset *> *  assets, BOOL isOriginal))success;

- (void)cameraOrLibrarySelectVC:(UIViewController *)presentVC maxSelectCount:(NSInteger)count videoNumber:(NSInteger)videocount success:(void(^)(NSInteger type,UIImage *image, NSURL *videoUrl,NSArray<UIImage *> *  images, NSArray<PHAsset *> *  assets, BOOL isOriginal))success;

+(BOOL)callTip:(BOOL)showTip Phone:(NSString *)str;

//获取所有有权限访问的部门
+ (void)getEnabledDepartmentArrayWithComplemention:(ComplentValueBlock)complemention;

+(void)getWarehouseArrayWithComplemention:(ComplentValueBlock)complemention;
//获取部门3级联动数据，大区、门店、仓库
+(void)getEnabled3LevelDeptChainWithComplemention:(ComplentValueBlock)complemention;
///施工场景
+ (void)getQueryTreeOrdinaryByCodeWithComplemention:(ComplentValueBlock)complemention;


///任务流撤回接口
+ (void)requestProcessCancleWithProcessId:(NSString *)processId complemention:(ComplentValueBlock)complemention;

// 下载网络文件
- (void)downloadUrl:(NSString *)urlStr fileName:(NSString *)fileName isShowAlert:(BOOL)isShowAlert;

extern NSString *const KBuiltType;
extern NSString *const KConstructionScene;
extern NSString *const KConstructionWorkingCondition;
extern NSString *const KCheckPosition;
extern NSString *const KCompanyType;


extern NSString *const KNotificationWithLogInRefreshData;
extern NSString *const KNotificationWithRefresheMainteanceReportListVC;

// 事件中心刷新
extern NSString *const KNotificationWithRefresheEventCenterVC;
// 事件详情刷新
extern NSString *const KNotificationWithRefresheEventDetailVC;
// 事件中心未读数量刷新
extern NSString *const KNotificationWithRefresheEventCount;

@end

NS_ASSUME_NONNULL_END
